import React from 'react'
import {Link,useNavigate} from 'react-router-dom'
export default function Login() {
  const nav=useNavigate()
  return (
    <div>
      <h1>用户登录</h1>
      <button onClick={()=>nav('/home')}>登录</button>
      <div>
         还有账户，请先 <Link to="/register">注册</Link>
      </div>
    </div>
  )
}
